package com.ruoyi.purchase.service;

import java.util.List;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.purchase.domain.MaterialReceive;
import com.ruoyi.purchase.vo.MaterialReceiveVO;

/**
 * 收料通知单Service接口
 * 
 * @author ruoyi
 * @date 2025-10-29
 */
public interface IMaterialReceiveService 
{
    /**
     * 获取发货单号
     *
     * @param id 收料通知单主键
     * @return 收料通知单
     */
    String generateReceiveId();

    /**
     * 新增发货单号
     *
     * @param id 收料通知单主键
     * @return 收料通知单
     */
    AjaxResult addMaterialReceiveWithDetails(MaterialReceiveVO materialReceiveVO);


    /**
     * 扫码箱码和发货单
     *
     * @param id 收料通知单主键
     * @return 收料通知单
     */
    AjaxResult scanCode(String code, boolean sameBatch);


    /**
     * 更新拒收状态
     *
     * @param id 收料通知单主键
     * @return 收料通知单
     */
    AjaxResult updateRejectStatus(Long detailId, Long isRejected);


    /**
     * 查询收料通知单列表VO
     *
     * @param id 收料通知单主键
     * @return 收料通知单
     */
    List<MaterialReceiveVO> selectMaterialReceiveVOList(MaterialReceive materialReceive);

    /**
     * 查询收料通知单
     *
     * @param id 收料通知单主键
     * @return 收料通知单
     */
    public MaterialReceiveVO  selectMaterialReceiveVOById(Long id);



    /**
     * 查询收料通知单
     * 
     * @param id 收料通知单主键
     * @return 收料通知单
     */
    public MaterialReceive selectMaterialReceiveById(Long id);

    /**
     * 查询收料通知单列表
     * 
     * @param materialReceive 收料通知单
     * @return 收料通知单集合
     */
    public List<MaterialReceive> selectMaterialReceiveList(MaterialReceive materialReceive);

    /**
     * 新增收料通知单
     * 
     * @param materialReceive 收料通知单
     * @return 结果
     */
    public int insertMaterialReceive(MaterialReceive materialReceive);

    /**
     * 修改收料通知单
     * 
     * @param materialReceive 收料通知单
     * @return 结果
     */
    public int updateMaterialReceive(MaterialReceive materialReceive);

    /**
     * 批量删除收料通知单
     * 
     * @param ids 需要删除的收料通知单主键集合
     * @return 结果
     */
    public int deleteMaterialReceiveByIds(Long[] ids);

    /**
     * 删除收料通知单信息
     * 
     * @param id 收料通知单主键
     * @return 结果
     */
    public int deleteMaterialReceiveById(Long id);
}
